/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.unmsm.cinfo.siga.datos;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author alumno
 */
@Embeddable
public class NotaEliminadaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ALU_COD")
    private int aluCod;
    @Basic(optional = false)
    @Column(name = "MODG_COD")
    private String modgCod;
    @Basic(optional = false)
    @Column(name = "NOTE_FECH")
    @Temporal(TemporalType.DATE)
    private Date noteFech;

    public NotaEliminadaPK() {
    }

    public NotaEliminadaPK(int aluCod, String modgCod, Date noteFech) {
        this.aluCod = aluCod;
        this.modgCod = modgCod;
        this.noteFech = noteFech;
    }

    public int getAluCod() {
        return aluCod;
    }

    public void setAluCod(int aluCod) {
        this.aluCod = aluCod;
    }

    public String getModgCod() {
        return modgCod;
    }

    public void setModgCod(String modgCod) {
        this.modgCod = modgCod;
    }

    public Date getNoteFech() {
        return noteFech;
    }

    public void setNoteFech(Date noteFech) {
        this.noteFech = noteFech;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) aluCod;
        hash += (modgCod != null ? modgCod.hashCode() : 0);
        hash += (noteFech != null ? noteFech.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NotaEliminadaPK)) {
            return false;
        }
        NotaEliminadaPK other = (NotaEliminadaPK) object;
        if (this.aluCod != other.aluCod) {
            return false;
        }
        if ((this.modgCod == null && other.modgCod != null) || (this.modgCod != null && !this.modgCod.equals(other.modgCod))) {
            return false;
        }
        if ((this.noteFech == null && other.noteFech != null) || (this.noteFech != null && !this.noteFech.equals(other.noteFech))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.edu.unmsm.cinfo.siga.datos.NotaEliminadaPK[ aluCod=" + aluCod + ", modgCod=" + modgCod + ", noteFech=" + noteFech + " ]";
    }
    
}
